home *** CD-ROM | disk | FTP | other *** search
/ CU Amiga Super CD-ROM 19 / CU Amiga Magazine's Super CD-ROM 19 (1998)(EMAP Images)(GB)[!][issue 1998-02].iso / CUCD / Magazine / SoundLab / Studio16add / scripts / Studio2StereoAIFF < prev    next >
Encoding:
AmigaDOS Script File  |  1997-11-11  |  2.1 KB  |  103 lines

  1. .key LEFT/A,RIGHT/A,DESTFILE/A
  2. .bra {
  3. .ket }
  4.  
  5. ; This script will convert two Studio 16 files into one stereo AIFF file.
  6. ;
  7. ; $VER: Studio2StereoAIFF 1.0 (11.11.97)
  8. ; Created by Kenneth 'Kenny' Nilsen (kenny@bgnett.no)
  9. ;
  10. ; USAGE: Studio2StereoAIFF <file_L> <file_R> <destfile>
  11. ;
  12. ; NOTE: The commands must be in the command search path. To be safe
  13. ; copy the commands in C: or add the path where you keep the commands to
  14. ; the global search path (startup-sequence: path <path> ADD).
  15.  
  16. ;** check files:
  17.  
  18. if not exists {LEFT}
  19.     echo "File '{LEFT}' doesn't exist!"
  20.     skip Final
  21.     else
  22.     S16IsStudio {LEFT} >nil:
  23.     If WARN
  24.     echo "File '{LEFT}' is not a Studio 16 file!"
  25.     skip Final
  26.     endif
  27.     else
  28.     S16IsPermanent {LEFT} >nil:
  29.     If WARN
  30.     echo "File '{LEFT}' contains edits!"
  31.     echo "Please make the file permanent and try again."
  32.     skip Final
  33.     endif
  34.     endif
  35.  
  36. if not exists {RIGHT}
  37.     echo "File '{RIGHT}' doesn't exist!"
  38.     skip Final
  39.     else
  40.     S16IsStudio {RIGHT} >nil:
  41.     If WARN
  42.     echo "File '{RIGHT}' is not a Studio 16 file!"
  43.     skip Final
  44.     endif
  45.     else
  46.     S16IsPermanent {RIGHT} >nil:
  47.     If WARN
  48.     echo "File '{RIGHT}' contains edits!"
  49.     echo "Please make the file permanent and try again."
  50.     skip Final
  51.     endif
  52.     endif
  53.  
  54. if exists {DESTFILE}
  55.     echo "WARNING: File '{DESTFILE}' already exist!"
  56.     ask "Continue ? (y/N)"
  57.     if not WARN
  58.        echo "Terminating.."
  59.        skip Final
  60.        endif
  61.     endif
  62.  
  63. ;** Ok, start the programs
  64.  
  65. echo "Converting... please wait"
  66.  
  67. Studio2AIFF {LEFT} {DESTFILE}_L.a >t:log.16
  68. if WARN
  69.     echo "Error while converting '{LEFT}' to tempfile '{DESTFILE}_L.a' !"
  70.     type t:log.16
  71.     skip Final
  72.     endif
  73.  
  74. Studio2AIFF {RIGHT} {DESTFILE}_R.a >t:log.16
  75. if WARN
  76.     echo "Error while converting '{LEFT}' to tempfile '{DESTFILE}_L.a' !"
  77.     type t:log.16
  78.     skip Final
  79.     endif
  80.  
  81. JoinAIFF {DESTFILE}_L.a {DESTFILE}_R.a {DESTFILE} >t:log.16
  82. if WARN
  83.     echo "Error while joining temp files '{DESTFILE}_L.a' and '{DESTFILE}_R.a' !"
  84.     type t:log.16
  85.     skip Final
  86.     endif
  87.  
  88. Delete {DESTFILE}_L.a {DESTFILE}_R.a >t:log.16
  89. if WARN
  90.     echo "Error deleting temp files!"
  91.     type t:log.16
  92.     skip Final
  93.     endif
  94.  
  95. Delete t:log.16 >nil:
  96.  
  97. ;** We're done
  98.  
  99. Echo "Done"
  100. Echo ""
  101.  
  102. Lab Final
  103.